package com.yike.common.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.yike.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

/**
 *  订单，拉卡拉分账详情表
 *
 * @author whc
 * @since 2025-05-08
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@TableName("qy_order_lkl_separate")
@ApiModel(value = "qy_order_lkl_separate")
public class OrderLklSeparate extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "店铺id")
    private Long shopId;


    @ApiModelProperty(value = "订单编号", required = true)
    private String orderNo;

    @ApiModelProperty(value = "商户号", required = true)
    private String merchantNo;

    @ApiModelProperty(value = "拉卡拉对账单流水号", required = true)
    private String logNo;

    @ApiModelProperty(value = "交易日期 posp日期，yyyyMMdd，查清结算用", required = true)
    private Date logDate;

    @ApiModelProperty(value = "商户分账指令流水号", required = true)
    private String outSeparateNo;

    @ApiModelProperty(value = "分账总金额[单位：分]", required = true)
    private Integer totalAmt;

    @ApiModelProperty(value = "0- 按照指定金额，1- 按照指定比例", required = false)
    private Integer calType;

    @ApiModelProperty(value = "分账状态：ACCEPTED:已受理,\n" +
            "PROCESSING:处理中,\n" +
            "FAIL:失败,\n" +
            "SUCCESS:成功,\n" +
            "CANCELING:撤销中,\n" +
            "CANCELED:撤销成功,\n" +
            "CANCEL_FAIL:撤销失败,\n" +
            "FALLBACKING:回退中,\n" +
            "FALLBACK_END:回退结束", required = true)
    private String status;


    @ApiModelProperty(value = "处理状态：  ACCEPTED:已受理,\n" +
            "PROCESSING:处理中,\n" +
            "FAIL:失败,\n" +
            "SUCCESS:成功", required = true)
    private String finalStatus;

    private String separateNo; //分账系统生成唯一流水
    private String fallbackOutSeparateNo; //分账回退指令流水号

    private String fallbackSeparateNo; //分账回退流水号 分账系统生成，系统唯一


}